<%@ include file="/common/taglibs.jsp" %>

<head>
    <title><fmt:message key="signup.title"/></title>
    <meta name="heading" content="<fmt:message key='signup.heading'/>"/>
    <meta name="author" content="jron"/>
    <link rel="stylesheet" type="text/css" media="screen" href="<c:url value='../../styles/jrsignup.css'/>"/>
    <link rel="stylesheet" type="text/css" media="screen" href="<c:url value='../../styles/fchk.css'/>"/>
    <script type="text/javascript" src="<c:url value='/scripts/mootools/sliding-tabs.js'/>"></script>

    <script type="text/javascript" src="<c:url value='/scripts/calendar/calendar.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/scripts/calendar/calendar-setup.js'/>"></script>
    <script type="text/javascript" src="<c:url value='/scripts/calendar/lang/calendar-en.js'/>"></script>

    <script type="text/javascript" src="<c:url value='/scripts/mootools/fchk.js'/>"></script>

    <style type="text/css">
        li {
            list-style: none
        }

        .infos {
            font-family: tahoma, arial, helvetica, sans-serif;
            font-weight: normal;
            color: #b4c24b;
            font-size: 1.8em;
        }
    </style>
</head>

<body id="signup"/>

<div class="separator"></div>

<%--<s:form name="signupForm" action="signup" method="post" validate="true">--%>
<form namespace="/" id="signupForm" name="signupForm" action="/signup.html" method="post">

<div id="container_login">
<div id="login_panel">
<div id="first">
<div id=heading>
    <fmt:message key="user.userGroup"/>
    <br>
    <br>

    <ul id="buttons">
        <li>
            <label class="required desc" id="ug_person"> <fmt:message key="signup.usergroup.person"/></label>
        <li>
            <label class="required desc" id="ug_company"> <fmt:message key="signup.usergroup.company"/></label>
        <li>
            <label class="required desc" id="ug_team"> <fmt:message key="signup.usergroup.team"/></label>
        <li>
            <label class="required desc" id="ug_goverment"> <fmt:message key="signup.usergroup.goverment"/></label>
        </li>
    </ul>
    <a href="#" id="next" title="<fmt:message key='signup.next'/>"><fmt:message key="signup.next"/></a>
</div>


<div id="panes">
<div id="jc_content">

<div id="person">
    
    <span>        
    <label class="required"> <fmt:message key="signup.yes"/>
        <input type="radio" name="personInfo.icReg" value="true" id="person_icreg"
               title="<fmt:message key='signup.usergroup.person.icreg.title'/>"/>
    </label>
    <label class="required"> <fmt:message key="signup.no"/>
        <input type="radio" name="personInfo.icReg" value="false"
               title="<fmt:message key='signup.usergroup.person.icreg.title'/>"/>
    </label>
    <fmt:message key="signup.usergroup.person.icreg"/>
    </span>

    <span>
    <label class="required" id="plant">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="personInfo.plant" value="true" id="plantv"
               title="<fmt:message key='signup.usergroup.person.plant.title'/>"/>
    </label>
    <label class="required" id="plantn">
        <fmt:message key="signup.no"/>
        <input type="radio" name="personInfo.plant" value="false" id="plantnv"
               title="<fmt:message key='signup.usergroup.person.plant.title'/>"/>
    </label>
    <fmt:message key="signup.usergroup.person.plant"/>
    <font color="orange"><fmt:message key="signup.usergroup.person.plant.ps"/></font>
    </span>

    <span id="isbasebig">
        <label class="required">
            <fmt:message key="signup.yes"/>
            <input type="radio" name="personInfo.base" value="true" id="person_base"
                   title="<fmt:message key='signup.usergroup.person.base.title'/>"/>
        </label>
        <label class="required">
            <fmt:message key="signup.no"/>
            <input type="radio" name="personInfo.base" value="false"
                   title="<fmt:message key='signup.usergroup.person.base.title'/>"/>
        </label>
        <fmt:message key="signup.usergroup.person.base"/>
       </span>

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="personInfo.broker" value="true" id="person_broker"
               title="<fmt:message key='signup.usergroup.person.broker.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="personInfo.broker" value="false"
               title="<fmt:message key='signup.usergroup.person.broker.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.person.broker"/>
    </span>

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="personInfo.expert" value="true" id="person_expert"
               title="<fmt:message key='signup.usergroup.person.expert.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="personInfo.expert" value="false"
               title="<fmt:message key='signup.usergroup.person.expert.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.person.expert"/>
    </span>

</div>
<div id="company">

<span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="companyInfo.corpBase" value="true"
               title="<fmt:message key='signup.usergroup.company.corpBase.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="companyInfo.corpBase" value="false"
               title="<fmt:message key='signup.usergroup.company.corpBase.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.company.corpBase"/>
    </span>

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="companyInfo.fungus" value="true"
               title="<fmt:message key='signup.usergroup.company.fungus.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="companyInfo.fungus" value="false"
               title="<fmt:message key='signup.usergroup.company.fungus.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.company.fungus"/>
    </span>

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="companyInfo.export" value="true"
               title="<fmt:message key='signup.usergroup.company.export.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="companyInfo.export" value="false"
               title="<fmt:message key='signup.usergroup.company.export.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.company.export"/>
    </span>

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="companyInfo.tech" value="true"
               title="<fmt:message key='signup.usergroup.company.tech.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="companyInfo.tech" value="false"
               title="<fmt:message key='signup.usergroup.company.tech.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.company.tech"/>
    </span>

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="companyInfo.agent" value="true"
               title="<fmt:message key='signup.usergroup.company.agent.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="companyInfo.agent" value="false"
               title="<fmt:message key='signup.usergroup.company.agent.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.company.agent"/>
    </span>

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="companyInfo.machine" value="true"
               title="<fmt:message key='signup.usergroup.company.machine.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="companyInfo.machine" value="false"
               title="<fmt:message key='signup.usergroup.company.machine.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.company.machine"/>
    </span>

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="companyInfo.store" value="true"
               title="<fmt:message key='signup.usergroup.company.store.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="companyInfo.store" value="false"
               title="<fmt:message key='signup.usergroup.company.store.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.company.store"/>
    </span>

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="companyInfo.pack" value="true"
               title="<fmt:message key='signup.usergroup.company.pack.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="companyInfo.pack" value="false"
               title="<fmt:message key='signup.usergroup.company.pack.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.company.pack"/>
    </span>

</div>
<div id="team">

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="teamInfo.groupIcReg" value="true" id="team_groupIcReg"
               title="<fmt:message key='signup.usergroup.team.groupIcReg.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="teamInfo.groupIcReg" value="false"
               title="<fmt:message key='signup.usergroup.team.groupIcReg.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.team.groupIcReg"/>
    </span>

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="teamInfo.groupBase" value="true" id="team_groupBase"
               title="<fmt:message key='signup.usergroup.team.groupBase.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="teamInfo.groupBase" value="false"
               title="<fmt:message key='signup.usergroup.team.groupBase.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.team.groupBase"/>
    </span>

</div>
<div id="goverment">

    <span>
    <label class="required">
        <fmt:message key="signup.yes"/>
        <input type="radio" name="govermentInfo.groupBase" value="true" id="goverment_groupBase"
               title="<fmt:message key='signup.usergroup.team.groupBase.title'/>"/>
    </label>
    <label class="required">
        <fmt:message key="signup.no"/>
        <input type="radio" name="govermentInfo.groupBase" value="false"
               title="<fmt:message key='signup.usergroup.team.groupBase.title'/>"/>
    </label>
        <fmt:message key="signup.usergroup.team.groupBase"/>
    </span>

</div>
</div>
</div>
</div>


<div id="userinfo">

<li class="info">
    <fmt:message key="signup.message"/>
    <a href="#" id="pre" title="<fmt:message key='signup.previous'/>"><fmt:message key="signup.previous"/></a>
</li>

<li class="info infos"><fmt:message key="signup.account.message"/></li>

<s:textfield key="user.username" cssClass="validate['required'] text large" required="true"
             title="%{getText('signup.user.username.title')}"/>
<input type="button" id="usernameval" class="btn" style="display:block;" disabled="true"
       value="<fmt:message key='button.validate.uname'/>" title="<fmt:message key='button.validate.username'/>"/>

<s:textfield key="user.email" theme="xhtml" cssClass="validate['required','email'] text large" required="true"
             title="%{getText('signup.user.email.title')}"/>

<%--<p id="email_m"></p> --%>


<div class="left">
    <s:password key="user.password" showPassword="true" theme="xhtml" required="true"
                cssClass="validate['required','length[6,-1]'] text medium"
                title="%{getText('signup.user.password.title')}"/>
</div>
<div>
    <s:password key="user.confirmPassword" theme="xhtml" required="true"
                showPassword="true" cssClass="validate['required','confirm[user_password]'] text medium"
                title="%{getText('signup.user.confirmPassword.title')}"/>
</div>


<s:textfield key="user.netTouch" theme="xhtml" cssClass="validate['required'] text medium" required="true"
             title="%{getText('signup.user.netTouch.title')}"/>

<fmt:message key="signup.ispublic"/>
<label class="required">
    <fmt:message key="signup.yes"/>
    <input type="radio" name="user.netTouchPub" value="true"
           title="<fmt:message key='signup.ispublic.title'/>"/>
</label>
<label class="required">
    <fmt:message key="signup.no"/>
    <input type="radio" name="user.netTouchPub" value="false" checked="true"
           title="<fmt:message key='signup.ispublic.title'/>"/>
</label>

<%--<p id="idcard_m"></p>    --%>

<span id="li_dyna"></span>

<li>
    <label class="desc" id="add_label"><fmt:message key="user.address.address"/></label>

    <div class="group">
        <div>
            <s:textfield key="user.address.address" theme="xhtml" cssClass="validate['required'] text large"
                         labelposition="bottom" required="true"
                         title="%{getText('signup.address.address.title')}"/>
        </div>
        <div class="left">
            <s:textfield key="user.address.city" theme="xhtml" cssClass="validate['required'] text medium" required="true"
                         labelposition="bottom"/>
        </div>
        <div>
            <s:textfield key="user.address.province" theme="xhtml" cssClass="validate['required'] text state" required="true"
                         labelposition="bottom"/>
        </div>
        <div class="left">
            <s:textfield key="user.address.postalCode" theme="xhtml" cssClass="validate['required'] text medium" required="true"
                         labelposition="bottom"/>
        </div>
        <div>
            <s:set name="country" value="user.address.country" scope="page"/>
            <appfuse:country name="user.address.country" prompt="" default="${country}"/>
            <p>
                <label for="user.address.country">
                    <fmt:message key="user.address.country"/> <span class="req">*</span>
                </label>
            </p>
        </div>
    </div>
</li>

<%--
<li>
<a href="#" id="jcaptcha">
    <img src="jcaptcha.jpg" name="captcha" alt="<fmt:message key='user.captcha'/>" title="<fmt:message key='jcaptcha.title'/>"/>
</a>
</li>

<li>
<s:textfield key="user.captcha" theme="xhtml" cssClass="text medium" title="%{getText('jcaptcha.promt.title')}"/>
</li>
--%>

<li/>
<span id="dynacontent"></span>

<li class="info" id="email_idcard"><fmt:message key="signup.welcome.message"/></li>

<li class="buttonBar bottom">

    <input type="submit" class="btn" value="<fmt:message key='button.register'/>" 
           id="signup_btn"/>
                    
    <%--<s:submit key="button.register" cssClass="btn" id="signup"/>--%>
    <%--<s:submit key="button.cancel" name="cancel" cssClass="btn" id="cancel"/>--%>
    <input type="button" class="btn" value="<fmt:message key='button.cancel'/>"
           onclick="location.href='<c:url value="/"/>'" id="cancel"/>

</li>

</div>

</div>
</div>

<s:hidden name="userType" id="userType"/>

</form>

<div id="messagebox">
    <div class="header">
        <div class="title"></div>
    </div>
    <div class="mbody">
        <div class="icon"></div>
        <ul class="mes">
        </ul>
    </div>
</div>

<s:hidden id="m_t" value="%{getText('msg.title.fail')}"/>
<s:hidden id="m_b" value="%{getText('errors.username.null')}"/>
<s:hidden id="btn" value="%{getText('button.validate.uname')}"/>
<s:hidden id="btning" value="%{getText('button.validate.uname.ing')}"/>

<%@ include file="/scripts/jc/jrsignup.js"%>
